﻿using SBlogCore.Application.Demo.IServices;

namespace SBlogCore.Application.Demo.Serivices
{
    /// <summary>
    /// 
    /// </summary>
    public class DemoService : IDemoService
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public async Task<string> HelloDemo()
        {
            return await Task.FromResult("Hello Demo");
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="age"></param>
        /// <param name="name"></param>
        /// <param name="ok"></param>
        /// <returns></returns>
        public string HelloDemoAop(int age,string name,bool ok)
        {
            //await Task.Delay(10000);
            return $"Hello Demo{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}";
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="age"></param>
        /// <param name="name"></param>
        /// <param name="ok"></param>
        /// <returns></returns>
        public  Task<string> HelloDemoAopAsync(int age,string name,bool ok)
        {
            //await Task.Delay(10000);
            return Task.FromResult($"Hello Demo{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
        }
    }
}
